#include<stdio.h>
#include<string.h>
#define BUFFER_SIZE 1024

int main()
{
    FILE* pf = fopen("bite","w+");
    if(pf == NULL)
    {
        perror("fopen fail");
        return 1;
    }

    char buffer1[BUFFER_SIZE] = "linux so easy!";
    char buffer2[BUFFER_SIZE];
    fwrite(buffer1,1,strlen(buffer1),pf);
    fseek(pf,0,SEEK_SET);
    size_t n = fread(buffer2,1,strlen(buffer1),pf);
    buffer2[n] = '\0';
    printf("%s\n",buffer2);

    fclose(pf);
    return 0;
}